package service.impl;

import java.sql.SQLException;
import java.util.List;
import bean.Type;
import dao.TypeDao;
import dao.impl.TypeDaoImpl;
import service.TypeService;

public class TypeServiceImpl implements TypeService {

	private TypeDao typeDao = new TypeDaoImpl();
	
	@Override
	public List<Type> queryAll() {
		try {
			return typeDao.queryAll();
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return null;
	}

	@Override
	public Boolean insert(Type type) {
		boolean succes = false;
		try {
			succes = typeDao.insert(type);
		} catch (SQLException e) {
			e.printStackTrace();
		}		
		return succes;
	}

}
